<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form method="post" action="update">
		<input type="hidden" name="id" value="${customer.id}">
		name<input type="text" name="name" value="${customer.name }"/><br/>
		sal<input type="number" name="sal" value="${customer.sal }"/><br/>
		birth<input type="date" name="birth" value="<fmt:formatDate value="${customer.birth }" pattern="yyyy-MM-dd"/>"/><br/>
		<c:if test="${customer.sex eq 'true' }">
		sex<input type="radio" name="sex" checked="checked" value="true">男
			<input type="radio" name="sex"  value="${customer.sex }">女<br/>
		</c:if>
		<c:if test="${customer.sex eq 'false' }">
		sex<input type="radio" name="sex"  value="true">男
			<input type="radio" name="sex" checked="checked" value="${customer.sex }">女<br/>
		</c:if>
		
		<c:if test="${customer.favs.indexOf('basket')>=0 &&customer.favs.indexOf('football') >=0}">
		favs<input type="checkbox" checked="checked" value="basket" name="favs">篮球
			<input type="checkbox" checked="checked" value="football" name="favs">足球
		</c:if>	
		<c:if test="${customer.favs.indexOf('basket')>=0 &&customer.favs.indexOf('football') <0}">
		favs<input type="checkbox" checked="checked" value="basket" name="favs">篮球
			<input type="checkbox" value="football" name="favs">足球
		<input type="submit" value="注册">
		</c:if>	
		<c:if test="${customer.favs.indexOf('basket')<0 &&customer.favs.indexOf('football') >=0}">
		favs<input type="checkbox" value="basket" name="favs">篮球
			<input type="checkbox" value="football" checked="checked" name="favs">足球
		<input type="submit" value="注册">
		</c:if>	
		<c:if test="${customer.favs.indexOf('basket')<0 &&customer.favs.indexOf('football') <0}">
		favs<input type="checkbox" value="basket" name="favs">篮球
			<input type="checkbox" value="football" name="favs">足球
		</c:if>	
		<input type="submit" value="更新">
	</form>
</body>
</html>